package com.cat.controller;

import com.cat.entity.Dict;
import com.cat.result.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@RestController//=@ResponseBody+@Controller res 风格
@RequestMapping(value="/dict")
@CrossOrigin
@SuppressWarnings({"unchecked", "rawtypes"})
public class DictController extends BaseController{
    /**
     * 根据上级id获取子节点数据列表
     * @param parentId
     * @return
     */
    @GetMapping(value = "findListByParentId/{parentId}")
    public Result<List<String>> findListByParentId(@PathVariable Long parentId) {
        List<String> arrayList = new ArrayList<>();
        arrayList.add("555");
        arrayList.add("888");
//        List<Dict> list = dictService.findListByParentId(parentId);
        return Result.ok(arrayList);
    }

}
